﻿using Xtensive.Orm;

namespace SoftRemoval.Model
{
  // Order could not be soft-removed
  [HierarchyRoot]
  public class Order : Entity
  {
    [Key, Field]
    public long Id { get; private set; }

    [Field]
    public Product Product { get; set; }

    public override string ToString()
    {
      return string.Format("Order({0}, Product={1})", Id, Product.Id);
    }

    public Order(Session session, Product product)
      : base(session)
    {
      Product = product;
    }
  }
}